import { createApp } from "vue";
//使用pinia
import { createPinia } from "pinia";
//pinia持久化存储
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
//引入ele组件
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import ElementPlus from "element-plus";
//引入粒子插件
import Particles from "particles.vue3";
//路由
import router from "./router";
//ele组件
import "element-plus/dist/index.css";

import App from "./App.vue";

const app = createApp(App);
//创建pinia
const pinia = createPinia();
//pinia使用持久化存储
pinia.use(piniaPluginPersistedstate);
//注册粒子插件
app.use(Particles);
// 注册ele组件
app.use(ElementPlus);

//使用icon图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
//使用路由
app.use(router);
// app.use(axios)
app.use(pinia);
app.mount("#app");
